
<div class="md-modal md-effect-3" id="modal-1">
	<div class="md-content">
		<div class="modal-header">
			<button class="md-close close">&times;</button>
			<h4 class="modal-title">完善订单信息</h4>
		</div>
		<div class="modal-body">
			<form role="form">
			<div class="form-group">
				<label  >订单人姓名</label>
				<div  >
					<input value=" "  type="text"   class="form-control" ng-model="order.name"/>
				</div>
			</div>
			<div class="form-group" >
				<label  >联系电话</label>
				<div  >
					<input type="text" class="form-control"   value="" ng-model="order.phone"/>
				</div>
				<input type="text" class="form-control"   value="" ng-model="order.status" ng-init="order.status=='已接单'"/>
			</div>
		</form>
		</div>
		<div class="modal-footer">
			<button type="button" class="btn btn-primary">保存</button>
		</div>
	</div>
</div>

<div class="col-lg-12">
	<!--当前位置 start-->
	<div class="row">
		<div class="col-lg-12">
			<ol class="breadcrumb">
				<li><a><i class="fa fa-home mrg-r-sm"></i>首页</a></li>
				<li class="active"><span>合作申请记录</span></li>
			</ol>
			<div class="filter-block pull-left">
				<!--搜索框 Start1-->
				<div class="form-group pull-left">
					<input type="text" class="form-control" ng-model="search.start_time" id="start_time" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"  placeholder="请输入开始发布时间">
				</div>
				<div class="form-group pull-left">
					~
				</div>
				<div class="form-group pull-left">
					<input type="text" class="form-control" ng-model="search.end_time" id="end_time"  onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" placeholder="请输入结束发布时间">
				</div>
				<div class="form-group pull-left">
					<input type="text" class="form-control" ng-model="search.order_id"  placeholder="请输入订单号">
				</div>
				<div class="form-group pull-left" >
					<select class="form-control"  ng-model="search.record_company_code" ng-options="company.code as company.name for company in companylist"  >
						<option value="">请选择发布企业</option>
					</select>
				</div>
				<div class="form-group pull-left">
					<select class="form-control"  ng-model="search.order_serviceType1_code" ng-click="getserviceType2(search.order_serviceType1_code)" ng-options=" service1.code as service1.title for service1 in serviceList1" >
						<option value="">请选择服务项目</option>
					</select>
				</div>
				<div class="form-group pull-left">
					 <select class="form-control"  ng-model="search.order_serviceType2_code"  ng-click="getserviceType3(search.order_serviceType2_code)"  ng-options=" service2.code as service2.title for service2 in serviceList2" >
						<option value="">请选择服务项目</option>
					 </select>
				</div>
				<div class="form-group pull-left">
					 <select class="form-control"  ng-model="search.order_serviceType3_code"  ng-options=" service3.code as service3.title for service3 in serviceList3" >
						<option value="">请选择服务项目</option>
					</select>
				</div>
				<div class="form-group pull-left">
					<input  class="form-control" ng-model="search.servant_name"  placeholder="请输入服务人员">
				</div>
				<div class="form-group pull-left">
					<input  class="form-control" ng-model="search.salary_rate"  placeholder="请输入分成比">
				</div>
				<div class="form-group pull-left">
					<select class="form-control"  ng-model="search.status_text"  >
						<option value="">请选择申请状态</option>
						<option value="通过">通过</option>
						<option value="拒绝">拒绝</option>
						<option value="撤销">撤销</option>
					</select>
				</div>
				<!--搜索框 End-->
				<a class="btn btn-success pull-left form-group" ng-click="searchCooperate(search)">
					 搜索
				 </a>
			</div>
		</div>
	</div>
	<!--当前位置 end-->
	
	<!--代码写在这里-->
	<div class="row">
			<div class="col-lg-12">
				<div class="main-box no-header clearfix">
				
					<div class="main-box-body clearfix" >
						<div class="table-responsive">
							<table class="table table-hover table-striped text-center">
								<thead >
									<tr>
										<th class="text-center"><span>订单号</span></th>
										<th class="text-center"><span>服务项目</span></th>
										<th class="text-center"><span>订单详情</span></th>
										<th class="text-center"><span>发布企业</span></th>
										<th class="text-center"><span>发布时间</span></th>
										<th class="text-center"><span>服务人员</span></th>
										<th class="text-center"><span>分成比</span></th>
										<th class="text-center"><span>订单人姓名</span></th>
										<th class="text-center"><span>联系电话</span></th>
										<th class="text-center"><span>申请状态</span></th>
										<th class="text-center"><span>操作</span></th>
									</tr>
								</thead>
								<tbody>
									<tr role="row" class="odd" ng-repeat="item in list"   on-finish-render-filters>
										
										<td> {{item.order_id}}</td>
										<td> {{item.order_serviceType1_title}}&nbsp;{{item.order_serviceType2_title}}&nbsp;{{item.order_serviceType3_title}}</td>
										<td> {{item.order_detail}}</td>
										<td>{{item.record_company_name}}</td>
										<td> {{item.request_time}}</td>
										<td>{{item.servant_name}}</td>
										<td> {{item.salary_rate}}</td>
										<td><span ng-if="item.status_text=='通过'">{{item.name}}</span></td>
										<td><span ng-if="item.status_text=='通过'">{{item.phone}}</span></td>
										<td>{{item.status_text}}</td>
										<td>
											<!--<a  ng-if="item.status_text=='通过'" class=" table-link default ng-scope"  >
		                                        <span class="fa-stack">
		                                            <i class="fa fa-square fa-stack-2x"></i>
		                                            <i class="fa fa-check fa-stack-1x fa-inverse"></i>
		                                        </span>
		                                    </a>-->
											<a ng-if="item.status_text=='待审核'" class="table-link danger ng-scope" ng-click="cancelApply(item._id.$id)">
		                                        <span class="fa-stack">
		                                            <i class="fa fa-square fa-stack-2x"></i>
		                                            <i class="fa fa-ban fa-stack-1x fa-inverse"></i>
		                                        </span>
                                    		</a>
											
											<a  ng-if="item.status_text=='撤销'" class="table-link default ng-scope" >
		                                        <span class="fa-stack">
		                                        	
		                                            <i class="fa fa-square fa-stack-2x"></i>
		                                            <i class="fa fa-ban fa-stack-1x fa-inverse"></i>
		                                        </span>
                                    		</a>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
						<ul class="pagination pull-right">
							<li><a >总条数：{{count}}</a></li>
							<li><a >总页数：{{totalPage}}</a></li>
					        <li><a ng-click="changePage(1)">首页</a></li>
					        <li><a ng-show="currentPage>1" ng-click="changePage(currentPage-1)"><i class="fa fa-chevron-left"></i></a></li>
					        <!--<li><span ng-show="frontdotShow">…</span></li>-->
					        <li ng-repeat="item in pageList" ng-click="changePage(item.number)" class="{{item.active}}"><a>{{item.number}}</a></li>
					        <!--<li><span ng-show="backdotShow">…</span></li>-->
					        <li><a ng-show="currentPage<totalPage" ng-click="changePage(currentPage+1)"><i class="fa fa-chevron-right"></i></a></li>
					        <li><a ng-click="changePage(totalPage)">尾页</a></li>
					    </ul>
					</div>
				</div>
			</div>
		</div>
	<!--代码写在这里  end-->
</div>








<div class="md-overlay"></div>

<script src="../default/js/modernizr.custom.js"></script>
<script src="../default/js/classie.js"></script>
<script src="../default/js/modalEffects.js"></script>
<script type="text/javascript">
function init() {
	var overlay = document.querySelector('.md-overlay');
	[].slice.call(document.querySelectorAll('.md-trigger')).forEach(function(el, i) {
		var modal = document.querySelector('#' + el.getAttribute('data-modal')),
			close = modal.querySelector('.md-close');
		function removeModal(hasPerspective) {
			classie.remove(modal, 'md-show');
			if (hasPerspective) {
				classie.remove(document.documentElement, 'md-perspective');
			}
		}

		function removeModalHandler() {
			removeModal(classie.has(el, 'md-setperspective'));
		}
		el.addEventListener('click', function(ev) {
			classie.add(modal, 'md-show');
			overlay.removeEventListener('click', removeModalHandler);
			overlay.addEventListener('click', removeModalHandler);
			if (classie.has(el, 'md-setperspective')) {
				setTimeout(function() {
					classie.add(document.documentElement, 'md-perspective');
				}, 25);
			}
		});
		close.addEventListener('click', function(ev) {
			ev.stopPropagation();
			removeModalHandler();
		});
		$(document).keyup(function(e) {
			if (e.keyCode == 27) {
				e.stopPropagation();
				removeModalHandler();
			}
		});
	});
}
function closeMod(){
	$(".md-close").click();
}

</script>